package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.AttendanceDedParamExample.E_ABSENTEEISM_TYPE;
import static org.jsola.hr.example.AttendanceDedParamExample.E_ABSENTEEISM_VALUE;
import static org.jsola.hr.example.AttendanceDedParamExample.E_COMPANY_ID;
import static org.jsola.hr.example.AttendanceDedParamExample.E_DED_AMOUNT;
import static org.jsola.hr.example.AttendanceDedParamExample.E_DED_TYPE;
import static org.jsola.hr.example.AttendanceDedParamExample.E_ITEM_ID;
import static org.jsola.hr.example.AttendanceDedParamExample.E_TIMES_OPERATOR;
import static org.jsola.hr.example.AttendanceDedParamExample.E_TIMES_VALUE;
import static org.jsola.hr.example.AttendanceDedParamExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.AttendanceDedParamExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.AttendanceDedParamExample.M_ITEM_ID_MAX;
import static org.jsola.hr.example.AttendanceDedParamExample.N_ABSENTEEISM_TYPE;
import static org.jsola.hr.example.AttendanceDedParamExample.N_ABSENTEEISM_VALUE;
import static org.jsola.hr.example.AttendanceDedParamExample.N_COMPANY_ID;
import static org.jsola.hr.example.AttendanceDedParamExample.N_DED_AMOUNT;
import static org.jsola.hr.example.AttendanceDedParamExample.N_DED_TYPE;
import static org.jsola.hr.example.AttendanceDedParamExample.N_ITEM_ID;
import static org.jsola.hr.example.AttendanceDedParamExample.N_TIMES_OPERATOR;
import static org.jsola.hr.example.AttendanceDedParamExample.N_TIMES_VALUE;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【考勤扣款设置参数】的参数")
@Data
public class AttendanceDedParamAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ITEM_ID, example = E_ITEM_ID)
    @Length(max = 32, message = M_ITEM_ID_MAX)
    private String itemId;

    @ApiModelProperty(notes = N_TIMES_OPERATOR, example = E_TIMES_OPERATOR)
    private Integer timesOperator;

    @ApiModelProperty(notes = N_TIMES_VALUE, example = E_TIMES_VALUE)
    private Integer timesValue;

    @ApiModelProperty(notes = N_DED_TYPE, example = E_DED_TYPE)
    private Integer dedType;

    @ApiModelProperty(notes = N_DED_AMOUNT, example = E_DED_AMOUNT)
    private Integer dedAmount;

    @ApiModelProperty(notes = N_ABSENTEEISM_TYPE, example = E_ABSENTEEISM_TYPE)
    private Integer absenteeismType;

    @ApiModelProperty(notes = N_ABSENTEEISM_VALUE, example = E_ABSENTEEISM_VALUE)
    private BigDecimal absenteeismValue;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

